package com.zy.service.crm;

import com.zy.entity.bs.Club;
import org.apache.ibatis.annotations.Param;

import com.zy.entity.crm.Customer;
import com.zy.entity.sys.User;
import com.zy.pojo.query.crm.CustomerQuery;
import com.zy.pojo.vos.common.PageVo;
import com.zy.service.base.BaseService;

import java.util.List;

public interface CustomerService extends BaseService<Customer> {

	/**
	 * 分页
	 * 
	 * @param customerQuery
	 * @param start
	 * @param limit
	 * @return
	 */
	PageVo pageCustomer(CustomerQuery customerQuery, int start, int limit);

	/**
	 * 新增
	 * 
	 * @param customer
	 */
	void saveCustomer(Customer customer);

	/**
	 * 更新
	 *
	 * @param customer
	 */
	void updateCustomer(Customer customer);

	/**
	 * 删除
	 * 
	 * @param id
	 */
	void removeCustomer(long id);

	/**
	 * 恢复
	 * 
	 * @param id
	 */
	void recover(long id);

	/**
	 * 获取客户名
	 * 
	 * @param id
	 * @return
	 */
	String getCustomerName(Long id);

	/**
	 * 保存客户账户
	 * 
	 */
	void saveCustomerUser(User user);

	/**
	 * 获取客户通过userId
	 * 
	 * @param userId
	 * @return
	 */
	Customer getCustomerByUserId(long userId);

	/**
	 * 
	 * @param newPsw
	 *            新密码
	 * @param pswRe
	 *            重新输入密码
	 */
	void updatePayPsw(Long id, String newPsw, String pswRe, String mobileCode);

	/**
	 * 难是否设置支付密码
	 * 
	 * @param id
	 * @return
	 */
	boolean whetherSetPayPsw(Long id);

	boolean isCheckPass(Long customerId, String moilde, String payPsw, String code);

	Customer webGetCustomer(Long id);

	Customer getCurrentCustomerInfo(long id);

	/**
	 * 解绑会员
	 * @param id
	 */
	void cancelBind(Long id,Long userId);

	/**
	 * 获取当前用户俱乐部列表
	 * @param customerId
	 */
	List<Club> getClubList(long customerId);

	/**
	 * 是否有加入俱乐部
	 * @param customerId
	 * @return
	 */
	boolean hasClub(Long customerId);

	/**
	 * 加入会员
	 */
	void joinCustomer(Customer customer);

    Customer updateCustomerApp(Customer customer);

    Customer customerInfo(Long id);


}
